﻿using System;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

// Token: 0x0200016A RID: 362
public class CharaLoadUI : LoadUI
{
	// Token: 0x0600096D RID: 2413 RVA: 0x00037C34 File Offset: 0x00035E34
	private void Awake()
	{
		this.buttonAll.onClick.AddListener(new UnityAction(this.ShortCut_All));
		this.buttonCoordinate.onClick.AddListener(new UnityAction(this.ShortCut_Coordinate));
		this.buttonHairFaceBody.onClick.AddListener(new UnityAction(this.ShortCut_Style));
		this.buttonNone.onClick.AddListener(new UnityAction(this.ShortCut_None));
		this.buttonLoad.onClick.AddListener(new UnityAction(this.Load));
		this.buttonCancel.onClick.AddListener(new UnityAction(this.Cancel));
	}

	// Token: 0x0600096E RID: 2414 RVA: 0x00037CEC File Offset: 0x00035EEC
	public override void Setup(Sprite thumbnail, string name, string file, Action<int> loadAct)
	{
		this.cardImage.sprite = thumbnail;
		this.nameText.text = name;
		this.file = file;
		this.loadAct = loadAct;
		base.gameObject.SetActive(true);
	}

	// Token: 0x0600096F RID: 2415 RVA: 0x00037D24 File Offset: 0x00035F24
	private void Update()
	{
		this.buttonLoad.interactable = (this.checkHair.isOn || this.checkFace.isOn || this.checkBody.isOn || this.checkWear.isOn || this.checkAccessory.isOn);
	}

	// Token: 0x06000970 RID: 2416 RVA: 0x00037D8C File Offset: 0x00035F8C
	private void ShortCut_All()
	{
		this.checkHair.isOn = true;
		this.checkFace.isOn = true;
		this.checkBody.isOn = true;
		this.checkWear.isOn = true;
		this.checkAccessory.isOn = true;
	}

	// Token: 0x06000971 RID: 2417 RVA: 0x00037DCC File Offset: 0x00035FCC
	private void ShortCut_Coordinate()
	{
		this.checkHair.isOn = false;
		this.checkFace.isOn = false;
		this.checkBody.isOn = false;
		this.checkWear.isOn = true;
		this.checkAccessory.isOn = true;
	}

	// Token: 0x06000972 RID: 2418 RVA: 0x00037E0C File Offset: 0x0003600C
	private void ShortCut_Style()
	{
		this.checkHair.isOn = true;
		this.checkFace.isOn = true;
		this.checkBody.isOn = true;
		this.checkWear.isOn = false;
		this.checkAccessory.isOn = false;
	}

	// Token: 0x06000973 RID: 2419 RVA: 0x00037E4C File Offset: 0x0003604C
	private void ShortCut_None()
	{
		this.checkHair.isOn = false;
		this.checkFace.isOn = false;
		this.checkBody.isOn = false;
		this.checkWear.isOn = false;
		this.checkAccessory.isOn = false;
	}

	// Token: 0x06000974 RID: 2420 RVA: 0x00037E8C File Offset: 0x0003608C
	private int CalcFilter()
	{
		int num = 0;
		if (this.checkHair.isOn)
		{
			num |= 1;
		}
		if (this.checkFace.isOn)
		{
			num |= 2;
		}
		if (this.checkBody.isOn)
		{
			num |= 4;
		}
		if (this.checkWear.isOn)
		{
			num |= 8;
		}
		if (this.checkAccessory.isOn)
		{
			num |= 16;
		}
		return num;
	}

	// Token: 0x06000975 RID: 2421 RVA: 0x00037F04 File Offset: 0x00036104
	private void Load()
	{
		int obj = this.CalcFilter();
		this.loadAct(obj);
		base.gameObject.SetActive(false);
	}

	// Token: 0x06000976 RID: 2422 RVA: 0x00037F30 File Offset: 0x00036130
	private void Cancel()
	{
		base.gameObject.SetActive(false);
	}

	// Token: 0x0400093F RID: 2367
	[SerializeField]
	private Image cardImage;

	// Token: 0x04000940 RID: 2368
	[SerializeField]
	private Text nameText;

	// Token: 0x04000941 RID: 2369
	[SerializeField]
	private Toggle checkHair;

	// Token: 0x04000942 RID: 2370
	[SerializeField]
	private Toggle checkFace;

	// Token: 0x04000943 RID: 2371
	[SerializeField]
	private Toggle checkBody;

	// Token: 0x04000944 RID: 2372
	[SerializeField]
	private Toggle checkWear;

	// Token: 0x04000945 RID: 2373
	[SerializeField]
	private Toggle checkAccessory;

	// Token: 0x04000946 RID: 2374
	[SerializeField]
	private Button buttonAll;

	// Token: 0x04000947 RID: 2375
	[SerializeField]
	private Button buttonCoordinate;

	// Token: 0x04000948 RID: 2376
	[SerializeField]
	private Button buttonHairFaceBody;

	// Token: 0x04000949 RID: 2377
	[SerializeField]
	private Button buttonNone;

	// Token: 0x0400094A RID: 2378
	[SerializeField]
	private Button buttonLoad;

	// Token: 0x0400094B RID: 2379
	[SerializeField]
	private Button buttonCancel;

	// Token: 0x0400094C RID: 2380
	private string file;

	// Token: 0x0400094D RID: 2381
	private Action<int> loadAct;
}
